// import echarts from 'vue-echarts/components/ECharts';
export default function(params, _this) {
  console.log('params.series[0].data', params)
  const xAxisData = params.map(item => item.date)
  const seriesData = params.map(item => item.num)
  return {
    grid: {
      left: 20,
      right: 40,
      top: 20,
      bottom: 20,
      containLabel: true
    },
    tooltip: {
      backgroundColor: '#fff',
      borderWidth: 1,
      borderColor: '#2B97f9',
      formatter: function(params) {
        return params.data
      },
      textStyle: {
        color: '#1890FF'
      }
    },
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: xAxisData
    },
    yAxis: {
      type: 'value'
    },
    series: [{
      data: seriesData,
      type: 'line',
      smooth: true,
      symbolSize: 10,
      itemStyle: {
        normal: {
          color: '#2883FF'
        }
      },
      lineStyle: {
        width: 3
      }
    }]
  }
}
